<template>
	<section>
		<!--  工具条 -->
		<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
			<el-form :inline="true" :model="filters">
				<el-form-item>
					<el-input v-model="filters.name" placeholder="姓名"></el-input>
				</el-form-item>
				<el-date-picker
						v-model="dateValue1"
						type="daterange"
						align="right"
						unlink-panels
						range-separator="  -- 至 --  "
						placeholder="选择开始日期和结束日期"
						:picker-options="pickerOptions"
						style="width: 260px">
				</el-date-picker>
				<el-form-item>
					<el-button type="primary" v-on:click="getListData">查询</el-button>
				</el-form-item>
				<el-form-item>
					<el-button type="primary" @click="showAdd">新增</el-button>
				</el-form-item>
			</el-form>
		</el-col>

		<!--  列表 -->
		<el-table :data="listData" highlight-current-row v-loading="listLoading" @selection-change="colsChange" style="width: 100%;">
			<el-table-column type="selection" width="50">
			</el-table-column>
			<el-table-column type="index" width="50" fixed>
			</el-table-column>
			<el-table-column prop="name" label="客户姓名"  width="150" sortable fixed>
			</el-table-column>
			<el-table-column prop="customerSource_id.name" label="客户来源" width="150" sortable>
			</el-table-column>
			<el-table-column prop="successRate" label="成功概率" width="150" sortable>
			</el-table-column>
			<el-table-column prop="remark" label="客户描述" width="200" >
			</el-table-column>
			<el-table-column prop="linkMan" label="联系人" width="150" >
			</el-table-column>
			<el-table-column prop="linkManTel" label="联系人电话" width="150" >
			</el-table-column>
			<el-table-column prop="inputUser_id.username" label="创建人" width="150" sortable>
			</el-table-column>
			<el-table-column prop="inputTime" label="创建时间" width="200" sortable>
			</el-table-column>
			<el-table-column prop="tenant_id.companyName" label="所属租户" width="150" sortable >
			</el-table-column>
			<el-table-column label="功能" width="240" fixed="right" header-align="center" align="center">
				<template scope="scope">
					<el-button type="primary" size="small" @click="showCusDevPlan(scope.$index, scope.row)">开发计划</el-button>
					<el-button type="success" size="small" @click="showCus(scope.$index, scope.row)">转为正式客户</el-button>
				</template>
			</el-table-column>
			<el-table-column label="操作" width="160" fixed="right" header-align="center" align="center">
				<template scope="scope">
					<el-button size="small" @click="showEdit(scope.$index, scope.row)">编辑</el-button>
					<el-button type="danger" size="small" @click="delSubmit(scope.$index, scope.row)">删除</el-button>
				</template>
			</el-table-column>

		</el-table>

		<!--  编辑界面 -->
		<el-dialog title="编辑" v-model="editFormOn" :close-on-click-modal="false" head-align="center" >
			<el-form :model="editForm2" label-width="80px" :rules="editForm1" ref="editForm2">
				<el-form-item label="潜在客户姓名" prop="name" label-width="120px">
					<el-input v-model="editForm2.name" auto-complete="off" style="width: 50%"></el-input>
				</el-form-item>
				<el-form-item label="客户来源" prop="customerSource_id" style="width: 50%" label-width="120px">
					<el-select v-model="editForm2.customerSource_id.id" placeholder="请选择" >
						<el-option
								v-for="k in cusSourceAll"
								:key="k.id"
								:label="k.name"
								:value="k.id">
						</el-option>
					</el-select>
				</el-form-item>
				<el-form-item label="成功几率" prop="successRate" style="width: 50%" label-width="120px" >
					<div class="block">
						<el-slider v-model.number="editForm2.successRate"></el-slider>
					</div>
				</el-form-item>
				<el-form-item label="客户描述" prop="remark" label-width="120px">
					<el-input v-model="editForm2.remark" type="textarea"
							  placeholder="请输入内容"
							  maxlength='50' auto-complete="off" style="width: 50%" ></el-input>
				</el-form-item>
				<el-form-item label="联系人" prop="linkMan" label-width="120px" >
					<el-input v-model="editForm2.linkMan" auto-complete="off" style="width: 50%"></el-input>
				</el-form-item>
				<el-form-item label="联系人电话" prop="linkManTel" label-width="120px" >
					<el-input v-model="editForm2.linkManTel" auto-complete="off" style="width: 50%"></el-input>
				</el-form-item>
			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button @click.native="editFormOn = false">取消</el-button>
				<el-button type="primary" @click.native="editSubmit" :loading="editLoading">提交</el-button>
			</div>
		</el-dialog>

		<!--  新增界面 -->
		<el-dialog title="新增" v-model="addFormOn" :close-on-click-modal="false" head-align="center" >
			<el-form :model="addForm2" label-width="80px" :rules="addForm1" ref="addForm2">
				<el-form-item label="潜在客户姓名" prop="name" label-width="120px">
					<el-input v-model="addForm2.name" auto-complete="off" style="width: 50%"></el-input>
				</el-form-item>
				<el-form-item label="客户来源" prop="customerSource_id" style="width: 50%" label-width="120px">
					<el-select v-model="addForm2.customerSource_id.id" placeholder="请选择" >
						<el-option
								v-for="k in cusSourceAll"
								:key="k.id"
								:label="k.name"
								:value="k.id">
						</el-option>
					</el-select>
				</el-form-item>
				<el-form-item label="成功几率" prop="successRate" style="width: 50%" label-width="120px" >
					<div class="block">
						<el-slider v-model.number="addForm2.successRate"></el-slider>
					</div>
				</el-form-item>
				<el-form-item label="客户描述" prop="remark" label-width="120px">
					<el-input v-model="addForm2.remark" type="textarea"
							  placeholder="请输入内容"
							  maxlength='50' auto-complete="off" style="width: 50%" ></el-input>
				</el-form-item>
				<el-form-item label="联系人" prop="linkMan" label-width="120px" >
					<el-input v-model="addForm2.linkMan" auto-complete="off" style="width: 50%"></el-input>
				</el-form-item>
				<el-form-item label="联系人电话" prop="linkManTel" label-width="120px" >
					<el-input v-model="addForm2.linkManTel" auto-complete="off" style="width: 50%"></el-input>
				</el-form-item>
			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button @click.native="addFormOn = false">取消</el-button>
				<el-button type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button>
			</div>
		</el-dialog>


		<!--  开发计划界面 -->
		<el-dialog title="开发计划" v-model="cusDevPlanFormOn" :close-on-click-modal="false" align="left">
			<el-form :model="cusDevPlanForm2" label-width="80px" :rules="cusDevPlanForm1" ref="cusDevPlanForm2">
				<el-form-item label="计划主题" prop="planSubject" label-width="120px">
					<el-input v-model="cusDevPlanForm2.planSubject" auto-complete="off" style="width: 50%" ></el-input>
				</el-form-item>
				<el-form-item label="计划内容" prop="planDetails" label-width="120px" >
					<el-input v-model="cusDevPlanForm2.planDetails" type="textarea" auto-complete="off" style="width: 50%"></el-input>
				</el-form-item>
				<el-form-item label="计划实施方法" prop="planType_id" label-width="120px" >
					<el-select v-model="cusDevPlanForm2.planType_id.id" placeholder="请选择" >
						<el-option
								v-for="k in typePlanAll"
								:key="k.id"
								:label="k.name"
								:value="k.id">
						</el-option>
					</el-select>
				</el-form-item>
			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button @click.native="cusDevPlanFormOn = false">取消</el-button>
				<el-button type="primary" @click.native="cusDevPlanSubmit" :loading="cusDevPlanLoading">提交</el-button>
			</div>
		</el-dialog>


		<!--  转为正式客户界面 -->
		<el-dialog title="转为正式客户" v-model="cusFormOn" :close-on-click-modal="false" align="left">
			<el-form :model="cusForm2" label-width="80px" :rules="cusForm1" ref="cusForm2">
				<el-form-item label="客户年龄" prop="age" label-width="120px">
					<el-input v-model.number="cusForm2.age" auto-complete="off" style="width: 50%" ></el-input>
				</el-form-item>
				<el-form-item label="客户性别" prop="gender" label-width="120px" >
					<el-radio-group v-model.number="cusForm2.gender">
						<el-radio :label="1">男</el-radio>
						<el-radio :label="0">女</el-radio>
						<el-radio :label="2">未知</el-radio>
					</el-radio-group>
				</el-form-item>
				<el-form-item label="电话号码" prop="tel" label-width="120px" >
					<el-input v-model="cusForm2.tel" auto-complete="off" style="width: 50%"></el-input>
				</el-form-item>
				<div style="color: #e64242;margin-left:50px;font-weight:bold" >其余信息请在客户信息管理表中完善</div>
			</el-form>
			<div slot="footer" class="dialog-footer">
					<el-button @click.native="cusFormOn = false">取消</el-button>
					<el-button type="primary" @click.native="cusSubmit" :loading="cusLoading">提交</el-button>
			</div>
		</el-dialog>


		<!--  工具条 -->
		<el-col :span="24" class="toolbar">
			<el-button type="danger" @click="batchRemove" :disabled="this.cols.length===0">批量删除</el-button>
			<el-pagination layout="prev, pager, next" @current-change="showCurrentChange" :page-size="pageSize" :total="total" style="float:right;">
			</el-pagination>
		</el-col>

	</section>
</template>

<script>
    import util from '../../../common/js/util';

    export default {
        data() {
            return{
                filters: {
                    name: ''
                },
                listData: [],
                keyword:'',
                pageSize: 10,
                currentPage:1,
                listLoading : false,
                //列表选中的列
                cols: [],

                //客户来源的下拉框
                cusSourceLoading:false,
                cusSourceAll:[],

                //计划实施方式的下拉框
                typePlanLoading:false,
                typePlanAll:[],

                //新增界面是否显示
                addFormOn: false,
				//新增等待界面
                addLoading: false,
				//新增表格
                addForm1: {
                    name: [
                        { required: true, message: '潜在客户姓名不能为空', trigger: 'blur' }
                    ],
                    successRate: [
                        { required: true, type: 'number', message: '成功几率不能为空', trigger: 'blur' }
                    ],
                    remark: [
                        { required: true, message: '简要备注不能为空', trigger: 'blur' }
                    ],
                    linkMan: [
                        { required: false, message: '联系人', trigger: 'blur' }
                    ],
                    linkManTel: [
                        { required: false, message: '联系人电话', trigger: 'blur' }
                    ]
                },
				//新增界面空表格
                addForm2: {
                    name:'',
                    customerSource_id:{
                        id:1,
					},
                    successRate:50,
                    remark:'',
                    linkMan:'',
                    linkManTel:'',
                    inputUser_id:{
                        id:'',
					},
                    inputTime:new Date(),
                    tenant_id:{
                        id:''
					}
                },

                //编辑界面是否显示
                editFormOn: false,
                //编辑等待界面
                editLoading: false,
                //编辑表格
                editForm1: {
                    name: [
                        { required: true, message: '潜在客户姓名不能为空', trigger: 'blur' }
                    ],
                    successRate: [
                        { required: true, type: 'number', message: '成功几率不能为空', trigger: 'blur' }
                    ],
                    remark: [
                        { required: true, message: '简要备注不能为空', trigger: 'blur' }
                    ],
                    linkMan: [
                        { required: false, message: '联系人', trigger: 'blur' }
                    ],
                    linkManTel: [
                        { required: false, message: '联系人电话', trigger: 'blur' }
                    ]
                },
                //编辑界面空表格
                editForm2: {
                    name:'',
                    customerSource_id:{
                        id:0,
                    },
                    successRate:50,
                    remark:'',
                    linkMan:'',
                    linkManTel:'',
                    inputUser_id:{
                        id:'',
                    },
                    inputTime:new Date(),
                    tenant_id:{
                        id:'',
                    }
                },


                //开发计划界面是否显示
                cusDevPlanFormOn: false,
                //开发计划等待界面
                cusDevPlanLoading: false,
                //开发计划表格
                cusDevPlanForm1: {
                    planSubject: [
                        { required: true,message: '计划主题不能为空', trigger: 'blur' }
                    ],
                    planDetails: [
                        { required: true,message: '计划内容不能为空', trigger: 'blur' }
                    ],
                },
                //开发计划空表格
                cusDevPlanForm2: {
                    potentialCustomer_id:{
                        id:1,
					},
                    planSubject:'',
                    planDetails:'',
                    planType_id:{
                        id:5,
					},
                    inputUser_id:{
                        id:'',
					},
                    inputTime:new Date(),
                    planTime:new Date(),
                    tenant_id:{
                        id:'',
					}
                },

                //转为正式客户界面是否显示
                cusFormOn: false,
                //转为正式客户等待界面
                cusLoading: false,
                //转为正式客户表格
                cusForm1: {
                    age: [
                        { required: true,type:'number',message: '客户年龄不能为空', trigger: 'blur' }
                    ],
                    gender: [
                        { required: true,type:'number', message: '必须选择客户性别', trigger: 'blur' }
                    ],
                    tel: [
                        { required: true,message: '客户电话不能为空', trigger: 'blur' }
                    ]
                },
                //转为正式客户空表格
                cusForm2: {
                    name:'',
                    age:0,
                    gender:1,
                    tel:'',
                    email:'',
                    qq:'',
                    wechat:'',
                    job_id:{
                        id:'',
					},
                    salaryLevel_id:{
                        id:'',
                    },
                    customerSource_id:{
                        id:'',
                    },
                    seller_id:{
                        id:'',
                    },
                    inputUser_id:{
                        id:'',
                    },
                    inputTime:new Date(),
                    tenant_id:{
                        id:'',
                    },
                    status:0,

                },


                //日期查询
                pickerOptions: {
                    shortcuts: [{
                        text: '最近一周',
                        onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
                            picker.$emit('pick', [start, end]);
                        }
                    }, {
                        text: '最近一个月',
                        onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                            picker.$emit('pick', [start, end]);
                        }
                    }, {
                        text: '最近三个月',
                        onClick(picker) {
                            const end = new Date();
                            const start = new Date();
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                            picker.$emit('pick', [start, end]);
                        }
                    }]
                },
                dateValue1: '',




			}
        },
        methods: {
            //分页查询 + 高级查询
            getListData() {
				let para = {
                    currentPage: this.currentPage,
                    pageSize:this.pageSize,
                    keyword: this.filters.name,
                    date1:this.dateValue1[0],
                    date2:this.dateValue1[1],

                };
                this.listLoading = true;
                this.$http.post('/potCustomer/findByPage',para).then(res=>{
                    let ajaxResult =  res.data;
                    if (ajaxResult.success){
                        this.listData = ajaxResult.data.result;
                        this.total = ajaxResult.data.total
                    }else {
                        this.$message({
                            message: '加载失败',
                            type: 'error'
                        });
                    }
                    this.listLoading = false;
                }).catch(error=>{
                    this.listLoading = false;
                    this.$message({
                        message: '加载失败',
                        type: 'error'
                    });
                })
            },
			//新增的界面
			showAdd:function () {
                this.addFormOn = true;
                this.addForm2 = {
                    name:'',
                    customerSource_id:{
                        id:1,
                    },
                    successRate:50,
                    remark:'',
                    linkMan:'',
                    linkManTel:'',
                    inputUser_id:{
                        id:'',
                    },
                    inputTime:new Date(),
                    tenant_id:{
                        id:'',
                    },
                };
                this.addForm2.inputUser_id.id = JSON.parse(sessionStorage.getItem('user')).id;
            },
			//新增的方法
			addSubmit:function () {
                this.$refs.addForm2.validate((valid) => {
                    if (valid) {
                        this.$confirm('确认提交吗？', '提示', {}).then(() => {
                            this.addLoading = true;
                            let para = Object.assign({}, this.addForm2);
                            console.debug(para);
                            this.$http.post('/potCustomer/insert',para).then(res =>{
                                let ajaxResult = res.data
                                if (ajaxResult.success){
                                    this.$message.success("添加成功");
                                    this.addFormOn = false;
                                    this.$refs['addForm2'].resetFields();
                                    this.getListData();
                                }else {
                                    this.addFormOn = false;
                                    this.$message({
                                        message: '添加失败',
                                        type: 'error'
                                    });
                                }
                                this.addLoading = false;
                            }).catch(error =>{
                                this.addLoading = false;
                                this.$message({
                                    message: '添加失败',
                                    type: 'error'
                                });
                            })
                        });
                    }
                });
            },

			//删除
            delSubmit: function (index, row) {
                this.$confirm('确认删除该记录吗?', '提示', {
                    type: 'warning'
                }).then(() => {
                    this.listLoading = true;
                    this.$http.delete('/potCustomer/delete/'+row.id,{}).then(res=>{
                        let ajaxResult =  res.data
                        if (ajaxResult.success){
                            this.$message({
                                message: '删除成功',
                                type: 'success'
                            });
                            this.getListData();
                        }else {
                            this.$message({
                                message: '删除失败',
                                type: 'error'
                            });
                        }
                        this.listLoading = false;
                    }).catch(error=>{
                        this.listLoading = false;
                        this.$message({
                            message: '删除失败',
                            type: 'error'
                        });
                    })

                });
            },

            //修改的界面
            showEdit:function (index, row) {
                this.editFormOn = true;
                this.editForm2 = Object.assign({}, row);
                this.editForm2.inputUser_id.id = JSON.parse(sessionStorage.getItem('user')).id;
            },

            //编辑
            editSubmit: function () {
                this.$refs.editForm2.validate((valid) => {
                    if (valid) {
                        this.$confirm('确认提交吗？', '提示', {}).then(() => {
                            this.editLoading = true;
                            let para = Object.assign({}, this.editForm2);
                            this.$http.post("/potCustomer/updateAll",para).then(res =>{
                                let ajaxResult = res.data;
                                if (ajaxResult.success){
                                    this.$message({
                                        message:"修改成功",
                                        type:'success'
                                    })
                                    this.$refs['editForm2'].resetFields();
                                    this.editFormOn = false;
                                    this.editLoading = false;
                                    this.getListData();
                                }else {
                                    this.editLoading = false;
                                    this.message({
                                        message:"修改失败",
                                        type:'error'
                                    })

                                }
                            }).catch(error=>{
                                this.editLoading = false;
                                this.$message({
                                    message:"修改失败",
                                    type:'success'
                                })
                            })
                        });
                    }
                });
            },


            //开发计划的界面
            showCusDevPlan:function (index,row) {

                this.cusDevPlanFormOn = true;
                this.cusDevPlanForm2 = {
                    potentialCustomer_id:{
                        id:1,
                    },
                    planSubject:'',
                    planDetails:'',
                    planType_id:{
                        id:5,
                    },
                    inputUser_id:{
                        id:'',
                    },
                    inputTime:new Date(),
                    planTime:new Date(),
                    tenant_id:{
                        id:'',
                    }
                };
                this.cusDevPlanForm2.id = row.id;
                this.cusDevPlanForm2.inputTime = row.inputTime;
                this.cusDevPlanForm2.inputUser_id.id = JSON.parse(sessionStorage.getItem('user')).id;
            },
            //开发计划的方法
            cusDevPlanSubmit:function () {
                this.$refs.cusDevPlanForm2.validate((valid) => {
                    if (valid) {
                        this.$confirm('确认提交吗？', '提示', {}).then(() => {
                            this.cusDevPlanLoading = true;
                            let para = Object.assign({}, this.cusDevPlanForm2);
                            console.debug(para);
                            this.$http.post('/potCusDevPlan/insert',para).then(res =>{
                                let ajaxResult = res.data;
                                if (ajaxResult.success){
                                    this.$message.success("添加开发计划成功");
                                    this.cusDevPlanFormOn = false;
                                    this.$refs['cusDevPlanForm2'].resetFields();
                                    this.getListData();
                                }else {
                                    this.cusDevPlanFormOn = false;
                                    this.$message({
                                        message: '添加失败1',
                                        type: 'error'
                                    });
                                }
                                this.cusDevPlanLoading = false;
                            }).catch(error =>{
                                this.cusDevPlanLoading = false;
                                this.$message({
                                    message: '添加失败2',
                                    type: 'error'
                                });
                            });

                        });
                    }
                });
            },


            //转为正式客户的界面
            showCus:function (index,row) {

                this.cusFormOn = true;
                this.cusForm2 = {
                    name:'',
                    age:0,
                    gender:1,
                    tel:'',
                    email:'',
                    qq:'',
                    wechat:'',
                    job_id:{
                        id:16,
                    },
                    salaryLevel_id:{
                        id:17,
                    },
                    customerSource_id:{
                        id:'',
                    },
                    seller_id:{
                        id:'',
                    },
                    inputUser_id:{
                        id:'',
                    },
                    inputTime:new Date(),
                    tenant_id:{
                        id:'',
                    },
                    status:0,
                };
                this.cusForm2.name = row.name;
                this.cusForm2.id = row.id;
                this.cusForm2.customerSource_id = row.customerSource_id;
                this.cusForm2.inputUser_id.id = JSON.parse(sessionStorage.getItem('user')).id;
                this.cusForm2.seller_id.id = JSON.parse(sessionStorage.getItem('user')).id;
            },
            //转为正式客户的方法
            cusSubmit:function () {
                this.$refs.cusForm2.validate((valid) => {
                    if (valid) {
                        this.$confirm('确认提交吗？', '提示', {}).then(() => {
                            this.cusLoading = true;
                            let para = Object.assign({}, this.cusForm2);
                            console.debug(para);
                            this.$http.post('/potCustomer/insertCus/'+this.cusForm2.id,para).then(res =>{
                                let ajaxResult = res.data;
                                if (ajaxResult.success){
                                    this.$message.success("转为正式客户成功");
                                    this.cusFormOn = false;
                                    this.$refs['cusForm2'].resetFields();
                                    this.getListData();
                                }else {
                                    this.cusFormOn = false;
                                    this.$message({
                                        message: '失败1',
                                        type: 'error'
                                    });
                                }
                                this.cusLoading = false;
                            }).catch(error =>{
                                this.cusLoading = false;
                                this.$message({
                                    message: '失败2',
                                    type: 'error'
                                });
                            });

                        });

                    }
                });
            },

			//显示正确的页数
            showCurrentChange(val) {
                this.currentPage=val;
                console.debug(this.currentPage);
                this.getListData();
            },

            colsChange: function (cols) {
                this.cols = cols;
            },

            //批量删除
            batchRemove: function () {
                var ids = this.cols.map(item => item.id)
                this.$confirm('确认删除选中记录吗？', '提示', {
                    type: 'warning'
                }).then(() => {
                    this.listLoading = true;
                    let para = { ids: ids };
                    this.$http.post("/potCustomer/batchDelete",para).then(res=>{
                        let ajaxResult = res.data;
                        if (ajaxResult.success){
                            this.$message({
                                message: '删除成功',
                                type: 'success'
                            });
                            this.getListData();
                        }else {
                            this.$message({
                                message: '删除失败',
                                type: 'error'
                            });
                        }
                        this.listLoading = false;
                    }).catch(error => {
                        this.listLoading = false;
                        this.$message({
                            message: '删除失败',
                            type: 'error'
                        });
                    })

                })
            },


			//客户来源的下拉框加载
            loadCusSource:function () {
                this.cusSourceLoading = true;
                this.$http.post('/potCustomer/selectCusSource').then(res=>{
                    let ajaxResult =  res.data;
                    if (ajaxResult.success){
                        this.cusSourceAll = ajaxResult.data;
                    }else {
                        this.$message({
                            message: '加载失败',
                            type: 'error'
                        });
                    }
                    this.cusSourceLoading = false;
                }).catch(error=>{
                    this.cusSourceLoading = false;
                    this.$message({
                        message: '加载失败',
                        type: 'error'
                    });
                })
            },

            //计划实施方式的下拉框加载
            loadTypePlan:function () {
                this.typePlanLoading = true;
                this.$http.post('/potCustomer/selectTypePlan').then(res=>{
                    let ajaxResult =  res.data;
                    if (ajaxResult.success){
                        this.typePlanAll = ajaxResult.data;
                    }else {
                        this.$message({
                            message: '加载失败',
                            type: 'error'
                        });
                    }
                    this.typePlanLoading = false;
                }).catch(error=>{
                    this.typePlanLoading = false;
                    this.$message({
                        message: '加载失败',
                        type: 'error'
                    });
                })
            },



        },


        mounted() {
            this.getListData();
            this.loadCusSource();
            this.loadTypePlan();
        }
    }

</script>

<style scoped>

</style>